package pub.permission.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pub.permission.dao.mongodb.repositories.ExtSysResourceRepository;
import pub.permission.domain.ExtSysResource;
import pub.permission.service.ExtSysResourceService;

import java.util.List;

/**
 * 描述:
 *
 * @author 002465
 * @created 2017/5/6 15:36
 * @return ${return_type}
 * @since v1.0.0
 * ${tags}
 */
@Service
public class ExtSysResourceServiceImpl implements ExtSysResourceService {
    @Autowired
    private ExtSysResourceRepository repository;

    public void saveOrUpdate(List<ExtSysResource> extSysResourceList){
        repository.save(extSysResourceList);
    }

    public List<ExtSysResource> getManageMenuList(){
        return repository.findByIsManageMenu(true);
    }
}
